import java.util.Scanner;
public class ArraySquareReverse {
        public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            int[] arr = new int [4];
            for(int i=0;i<arr.length;i++){
                arr[i] = sc.nextInt();
            }
            printArray(arr);
            reverse(arr);
        }
        public static void reverse(int[] arr) {
        int[] tem = new int[arr.length];
        for(int i=0; i<arr.length; i++) {
            tem[i] = arr[arr.length-1-i]*arr[arr.length-1-i];
        }
        printArray(tem);
    }
        public static void printArray(int[] arr) {
                for(int i=0; i<arr.length; i++) {
                    if(arr.length==1) {
                        System.out.println("["+arr[0]+"]");
                    }
                    else if(i==0) {
                        System.out.print("["+arr[0]+",");
                    }
                    else if(i==arr.length-1) {
                        System.out.println(arr[i]+"]");
                    }
                    else {
                        System.out.print(arr[i]+",");
                    }
                }
            }

}

